﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
using Informator.Presentation.Predmeti;
using Informator.Presentation.Common;

namespace Informator.Presentation.Predmeti
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
       
       double sirina;
       double left;
       double visina;
        public Window1(double sirina_, double left_,double visina_)
        {
            
            InitializeComponent();
            btnizadji.Click += (oo, ee) => { Animate.SlideDownBack(this); };
            sirina = sirina_ + 50;
            left = left_;
            visina = visina_;
            this.Height = visina;
            this.Width = sirina;
            
            this.Top = 150;
            this.Left = left_ - 2;
            Predmeti pr = new Predmeti();
            int b = 0;
            ishodtxt.Text += "\n";
            ishodtxt.Text = "Теоријска настава:";
            ishodtxt.Text += "\n";
            
            Ciljtxt.Width = sirina - 20;
            Ciljtxt.Text = pr.sadrzajCilj;
            Ciljtxt.TextWrapping = TextWrapping.Wrap;

            for (int i = 0; i <= pr.sadrzajPredmetaNiz.Length - 2; i++)
            {
                b++;

                if (pr.sadrzajPredmetaNiz[i].Substring(0, 19) == " Практична настава:")
                {
                    ishodtxt.Text += "\n";
                    ishodtxt.Text += "Практична настава:";
                    ishodtxt.Text += "\n";
                    b = 0;
                    Grid.SetColumn(ishodtxt, 1);
                }
                else { ishodtxt.Text += b.ToString() + ". " + pr.sadrzajPredmetaNiz[i] + "\n"; Grid.SetRow(ishodtxt, 3); Grid.SetColumn(ishodtxt, 0); }
            }

           
        }
    }
}
